﻿package com.eitb.programas.diputacion{
	import flash.display.*;
	import flash.text.*;
	import flash.events.*;
	import flash.media.*;
	import flash.net.*;
	
	import com.eitb.cargadores.*;
	import com.eitb.reproductores.*;
	import com.eitb.programas.diputacion.entidades.*;

	public class DialogoPresentacion extends Sprite implements IVistaPresentacion {
		private var cPresentacion:IControladorPresentacion;
		private var cVideo:IControladorVideo;
		private var cCargador:IControladorCargador;

		public function DialogoPresentacion():void {
			this.initVideoPlayer();
		}

		// INIT COMPONENTES
		public function initControlador(cPresentacion:IControladorPresentacion):void {
			this.cPresentacion=cPresentacion;
		}

		public function initControladorVideo(cVideo:IControladorVideo):void {
			this.cVideo=cVideo;
		}
		
		public function initControladorCargador(cCargador:IControladorCargador):void {
			this.cCargador = cCargador;
		}
		// INIT COMPONENTES

		// INIT PARAMETROS
		public function initVideoPlayer():void {
			this.video.visible = false;
		}

		public function initEvents():void {
			this.videoBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onVideoBtnClick);
			this.pdfBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onPdfBtnClick);
			this.audioBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onAudioBtnClick);
			this.adelanteBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onAdelanteBtnClick);
			this.mainMenuBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onMainMenuBtnClick);
			this.imagenBtn.addEventListener(MouseEvent.CLICK, this.cPresentacion.onImagenBtnClick);
		}
		// INIT PARAMETROS
		
		// Start - IVistaPresentacion
		
		public function setVisible(visible:Boolean):void {
			this.visible=visible;
		}
	
		public function setImagenBtnText(text:String):void {
			this.imagenBtn.texto.text = text;
		}
		
		public function setAudioBtnText(text:String):void {
			this.audioBtn.texto.text = text;
		}
		
		public function setPdfBtnText(text:String):void {
			this.pdfBtn.texto.text = text;
		}
		
		public function setVideoBtnText(text:String):void {
			this.videoBtn.texto.text = text;
		}
		
		public function setImagenBtnVisible(visible:Boolean):void {
			this.imagenBtn.visible = visible;
		}
		
		public function setAudioBtnVisible(visible:Boolean):void {
			this.audioBtn.visible = visible;
		}
		
		public function setPdfBtnVisible(visible:Boolean):void {
			this.pdfBtn.visible = visible;
		}
		
		public function setVideoBtnVisible(visible:Boolean):void {
			this.videoBtn.visible = visible;
		}
		
		public function setAdelanteBtnText(text:String):void {
			this.adelanteBtn.texto.text = text;
		}
		
		public function setMainMenuBtnText(text:String):void {
			this.mainMenuBtn.texto.text = text;
		}
		
		public function setTituloText(text:String):void {
			this.titulo_presentacion.text = text;
		}
		
		public function setSumarioText(text:String):void {
			//this.titulo_presentacion.text = text;
		}
		
		public function setDescripcionText(text:String):void {
			this.descripcion.text = text;
		}
		
		// End - IVistaPresentacion
	}
}